package presentation.models;

import java.util.Vector;

import javax.swing.DefaultListModel;

import presentation.UIThread;

/**
 * list model for the presented threads
 * manages all the presented threads.
 */
public class ThreadsListModel extends DefaultListModel
{
	
	private static final long serialVersionUID = -1996945861214429751L ;

	/**
	 * constructor
	 */
	public ThreadsListModel(){
		super();
	}
	
	/**
	 * sets the list model to hold the given threads
	 * @param threads - the threads to set
	 */
	public void setThreads(Vector<UIThread> threads){
		this.removeAllElements();
		for(int i=0; i<threads.size(); i++){
			this.addElement(threads.elementAt(i));
		}
	}
}
